#include <iostream>
#include <cstring>
using namespace std;

int main() {

    char str[100] = { 0 };
    char substr[100] = { 0 };

    cin.getline(str, sizeof(str));
    cin.getline(substr, sizeof(substr));

    int count = 0;

    // write your code here......
    for(int i = 0; str[i]; i++){
        int j = 0, k = i;
        while(substr[j]){
            if(str[k++] == substr[j++])
                continue;
            else{
                break;
            }
        }
        if(str[k - 1] == substr[j - 1])
            count++;
    }
    cout << count << endl;

    return 0;
}

/*键盘输入两个字符串 str 和 substr，统计字符串 substr 在 字符串 str 中出现的次数，并输出。*/